
Partial Class Usercontrols_ControlPanel_Avatar
    Inherits UserControlBase

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If GetBooleanFromQueryString("editprofile") Then
            Response.ContentType = Profile.User.PictureType
            Response.BinaryWrite(Profile.User.Picture)
            Response.End()
        ElseIf GetBooleanFromQueryString("showavatar") Then
            If Not (Profile.GetProfile(Membership.GetUser(GetStringFromQueryString("UserName")).UserName.ToString).User.Picture Is Nothing) Then
                Response.ContentType = Profile.GetProfile(Membership.GetUser(GetStringFromQueryString("UserName")).UserName.ToString).User.PictureType
                Response.BinaryWrite(Profile.GetProfile(Membership.GetUser(GetStringFromQueryString("UserName")).UserName.ToString).User.Picture)
                Response.End()
            End If
        Else

        End If
    End Sub
End Class
